<template>
  <div>
    <h3>父组件</h3>
    <h3 v-show="sum>0">我有{{sum}}万元</h3>
    <Son a="3" v-bind="{x:20,y:1001}" :giveMoney = "get" />
  </div>
</template>

<script setup lang='ts' name="Father">
import { ref, reactive } from 'vue'
import Son from './Son.vue';

let sum = ref(0)

function get(num:number){
  sum.value += num
}

</script>


<style lang='scss' scoped>

</style>